//
//  ShareApp.swift
//  Share
//
//  Created by MBA on 2020/10/4.
//  Copyright © 2020 MBA. All rights reserved.
//

import SwiftUI

//import DoraemonKit


@main
struct ShareApp: App {
    func initsqlite()  {
//        DoraemonManager.shareInstance().install()
        SQLiteManage().install()
    }
    @Environment(\.scenePhase) private var scenePhase
    var body: some Scene {
        WindowGroup {
            ContentView()
        }
        .onChange(of: scenePhase){phase in
            
            switch phase{
            case .active:
                initsqlite()
                print("active")
            case .inactive:
                print("inactive")
            case .background:
                print("background")
            @unknown default:
                print("for future")
            }
        }
        
    }
}



